import Vue from 'vue';
import App from './App';
import api from "api/api.js";
import Loading from "components/loading/loading.vue"
import Time from "components/time/time.vue"
import Order from "components/order/order.vue"
import TimeSelect from "@/components/TimeSelect/TimeSelect.vue"
import btSelects from '@/components/min-action-sheet/min-action-sheet.vue';
import CheckBox from '@/components/CheckBox/CheckBox.vue';
import store from './store'
import {checkPermission} from 'static/js/permission.js'
import utils from '@/common/js/utils.js'

Vue.component('Loading',Loading)
Vue.component('Time',Time)
Vue.component('Order',Order)
Vue.component('TimeSelect',TimeSelect)
Vue.component('bt-selects',btSelects);
Vue.component('CheckBox',CheckBox)
Vue.config.productionTip = false;

App.mpType = 'app'

const app = new Vue({
	store,
    ...App
})
app.$mount()

Vue.prototype.utils=utils;
Vue.prototype.$api = api;
Vue.prototype.$app = app;
Vue.prototype.$hideBox = new hideBox;
Vue.prototype.$prompt = new prompt;
Vue.prototype.checkPermission=checkPermission;



function hideBox(){
	return new Promise((resolve,reject) => {
		setTimeout(()=>{
			return false
		},200)
	})
}

function prompt(title){
	uni.showToast({title,icon:"none"})
}
